package com.frame.db.util;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

public class Condition {

    private Condition(){

    }

    public static IPage page(Query query){
        IPage page = new Page();
        page.setCurrent(query.getCurrent());
        page.setSize(query.getSize());
        return page;
    }

    public static IPage init(){
        IPage page = new Page();
        Query query = new Query();
        page.setCurrent(query.getCurrent());
        page.setSize(query.getSize());
        return page;
    }
}
